import { debounce } from "@/common/utils.js"

export const imgLoadedMixin = {
  data() {
    return {
      myRefresh: null,
    }
  },
  mounted() {
    const refresh = debounce(this.$refs.myScroll.refresh, 100);
    this.myRefresh = () => {
      refresh();
    }
    this.$bus.$on("imgLoaded", this.myRefresh);
    // const obj = {
    //   a: "123",
    //   func: refresh,
    // }
    // obj.func("123")
  }
}